﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using MadProps;
using System.ComponentModel.DataAnnotations;

namespace MadPropsDemo.RecipeEditor
{
    [Meta.Tracking(Tracking.Tracked)]
    public class Recipe : BaseModel
    {
        public static readonly Recipe Schema = BuildSchema<Recipe>();

        public ObservableCollection<Ingredient> Ingredients { get; internal set; }

        [Required]
        public readonly IProp<string> Name;

        public readonly IProp<string> Tags;

        [Required]
        [UIHint("MultilineString")]
        public IProp<string> Description { get; protected set; }        

        public Recipe()
        {
            Ingredients = new ObservableCollection<Ingredient>();
        }
    }
}
